package com.xingbang.controller;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.io.File;
@RunWith(SpringRunner.class)
//启动Spring
@SpringBootTest
public class test {
	private final Logger myLog = LoggerFactory.getLogger(test.class);
	@Autowired
	private UserController userController;
	@Test
	public void getHello() throws Exception {
		userController.user();
	}
	@Test
	public void test() throws Exception {
		File file = new File("..");
		myLog.info("0-file = " + file.getCanonicalPath());
		myLog.info("1-file = " + file.getAbsolutePath());
	}
}
